<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="a.header.jsp" %>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head> 
 <body>


<input type="button" value="test" id="button">

<input type="text" id="username">
<script>

layui.use('table', function(){
  var table = layui.table;
  $=layui.$;		//layui内置的jquery
  var cp=params;
  console.log(cp);
  $('#username').val(cp.username)
  $('#button').click(function() {
	    alert(cp.username);
	})
  parent.$("#iitest").val("子页面的值");
//   parent.location.reload(); 刷新父页面
  var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
  console.log(index);
//   parent.layer.close(index);
});
</script>
</body>

</html>